<?php
/**
 * @author: kris realiza	
 * @email: kris.realiza@dwebsite.com
 * @on: 01/08/09
 * 
 */
 
 Zend_Loader::loadClass("BaseDBRows");
 Zend_Loader::loadClass("LevelRow");

 class LevelRows extends BaseDBRows
 {
	function setUp(){
		$this->_tableName = LevelRow::_tablename;
		$this->setRowClass("LevelRow");
	}
		
	public function deleteLevels($level_ids)
	{
			if($level_ids)
			{
				$query = new QueryCreator();
		 		$query->addFrom($this->_tableName);
		 		$query->addUpdate(array("deleted" => 1));
		 		if(is_array($level_ids))
		 			$level_ids = implode(",",$level_ids);
		 		$query->addWhere("id IN (".$level_ids.")");
		 		$db = DBCon::instance();				
				$db->executeCommand($query->createSQL("update"));				
			}
	}
 }
 
?>